package chapter4;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.StatusLineManager;
import org.eclipse.jface.resource.ImageDescriptor;

public class statusAction extends Action{
	StatusLineManager slm;
	short count;
	
	public statusAction(StatusLineManager sm) {
		super("&Trigger@Ctrl+T", AS_PUSH_BUTTON);
		slm = sm;
		setToolTipText("Trigger the action");
		
		
		setImageDescriptor(ImageDescriptor.createFromFile(this.getClass(), 
				"../im/eclp.gif"));
	}
	
	@Override
	public void run() {
		count++;
		slm.setMessage("the status action has fired. count : "+ count);
	}
}
